package model;

import java.util.Locale;
import controller.Context;


public final class GlobalParams {
	
	
    private static volatile GlobalParams instance = null;
 
    public static GlobalParams getInstance() {
        if (instance == null) {
            synchronized (GlobalParams.class) {
                if (instance == null) {
                    instance = new GlobalParams();
                    
                }
            }
        }
        return instance;
    } 
   
    private GlobalParams() {
    	context = new Context();   
    	stringCollection = new StringCollection(context);
    }
    
    public void changeLanguage() {
    	if (context.getLocale().equals(Locale.ENGLISH)) {
    		context.setLocale(new Locale("PL"));
    	} else {
    		context.setLocale(Locale.ENGLISH);
    	}     	
    	update();
    }
    
    public void update() { 	
    	stringCollection.update(); 	
    	
    }
    
    
    
    private Context context;
    public StringCollection stringCollection;
    
    public final int DefautlXDimension = 1200;
    public final int DefaultYDimension = 700;
    
    public int defaultLook = 2;
}
